﻿import Types from '../actionTypes';

import {
  getDataCenter
} from '../../api';

const GET_DATA_CENTER = () => {
  return new Promise((resolve, reject) => {
    getDataCenter()
      .then(res => {
        resolve({
          type: Types.GET_DATA_CENTER,
          data: res.data
        });
      })
      .catch(err => {
        console.log(err);
      });
  });
};

export default {
  GET_DATA_CENTER
};
